package com.edgar.fileupload;

import android.app.Application;

import com.android.volley.toolbox.ImageLoader;
import com.edgar.baselibrary.cache.CacheManager;
import com.edgar.baselibrary.network.NetworkHelp;
import com.edgar.loglib.LogUtils;

/**
 * Created by edgar on 2016/1/17.
 */
public class MyApplication extends Application implements IApp{

    private ImageLoader imageLoader;

    @Override
    public void onCreate() {
        super.onCreate();
        LogUtils.initialize(this);
        NetworkHelp.getInstance().init(getApplicationContext());
        CacheManager.initCache(getApplicationContext());
        imageLoader = new ImageLoader(NetworkHelp.getInstance().getRequestQueue(),CacheManager.getInstance().getImageCache());
    }

    @Override
    public ImageLoader getImageLoader(){
        return imageLoader;
    }
}